package net.lahuobao.mall.entity.admin;

import javax.persistence.*;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.jeecgframework.web.system.pojo.base.TSBaseUser;

/**
 * @Title: Entity
 * @Description: 油卡
 * @author zhangdaihao
 * @date 2016-10-11 13:44:41
 * @version V1.0
 *
 */
@Entity
@Table(name = "mall_shop_cardrule", schema = "lahuobao")
@DynamicUpdate(true)
@DynamicInsert(true)
@SuppressWarnings("serial")
public class MallShopCardruleEntity implements java.io.Serializable {
    /**id*/
    private java.lang.Integer id;
    /**shopid*/
    private java.lang.Integer shopid;
    /**商品id*/
    private java.lang.Integer productid;
    /**oilsupplierid*/
    private java.lang.Integer oilsupplierid;
    /**cardno*/
    private java.lang.String cardno;
    /**cardrule*/
    private java.lang.String cardrule;
    /**min*/
    private java.lang.Integer min;
    /**max*/
    private java.lang.Integer max;
    /**cardlength*/
    private java.lang.Integer cardlength;
    /**createtime*/
    private java.util.Date createtime;
    /**createuserid*/
    private java.lang.Integer createuserid;

    private MallShopEntity mallShopEntity;

    private TSBaseUser user;

    private MallProductEntity productEntity;

    private MallOilsupplierEntity oilsupplierEntity;

    //油卡前缀
    private String cardNoPrefix;
    //开始卡号
    private String startCardNo;
    //结束卡号
    private String endCardNo;

    private Integer projectUserId;

    private MallProjectUserEntity prjUserEntity;

    /**0未回收、1已回收、3已挂失*/
    private java.lang.Integer state;

    private Boolean isdelete;

    @Column(name ="PROJECTUSERID")
    public Integer getProjectUserId() {
        return projectUserId;
    }

    public void setProjectUserId(Integer projectUserId) {
        this.projectUserId = projectUserId;
    }

    @ManyToOne(targetEntity = MallProjectUserEntity.class)
    @JoinColumn(name="projectUserId",referencedColumnName = "ID", insertable = false, updatable = false)
    public MallProjectUserEntity getPrjUserEntity() {
        return prjUserEntity;
    }
    public void setPrjUserEntity(MallProjectUserEntity prjUserEntity) {
        this.prjUserEntity = prjUserEntity;
    }

    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  id
     */

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name ="ID",nullable=false,precision=10,scale=0)
    public java.lang.Integer getId(){
        return this.id;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  id
     */
    public void setId(java.lang.Integer id){
        this.id = id;
    }
    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  shopid
     */
    @Column(name ="SHOPID",nullable=false,precision=10,scale=0)
    public java.lang.Integer getShopid(){
        return this.shopid;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  shopid
     */
    public void setShopid(java.lang.Integer shopid){
        this.shopid = shopid;
    }
    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  商品id
     */
    @Column(name ="PRODUCTID",nullable=false,precision=10,scale=0)
    public java.lang.Integer getProductid(){
        return this.productid;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  商品id
     */
    public void setProductid(java.lang.Integer productid){
        this.productid = productid;
    }
    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  oilsupplierid
     */
    @Column(name ="OILSUPPLIERID",nullable=false,precision=10,scale=0)
    public java.lang.Integer getOilsupplierid(){
        return this.oilsupplierid;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  oilsupplierid
     */
    public void setOilsupplierid(java.lang.Integer oilsupplierid){
        this.oilsupplierid = oilsupplierid;
    }
    /**
     *方法: 取得java.lang.String
     *@return: java.lang.String  cardno
     */
    @Column(name ="CARDNO",nullable=true,length=50)
    public java.lang.String getCardno(){
        return this.cardno;
    }

    /**
     *方法: 设置java.lang.String
     *@param: java.lang.String  cardno
     */
    public void setCardno(java.lang.String cardno){
        this.cardno = cardno;
    }
    /**
     *方法: 取得java.lang.String
     *@return: java.lang.String  cardrule
     */
    @Column(name ="CARDRULE",nullable=true,length=200)
    public java.lang.String getCardrule(){
        return this.cardrule;
    }

    /**
     *方法: 设置java.lang.String
     *@param: java.lang.String  cardrule
     */
    public void setCardrule(java.lang.String cardrule){
        this.cardrule = cardrule;
    }
    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  min
     */
    @Column(name ="MIN",nullable=true,precision=10,scale=0)
    public java.lang.Integer getMin(){
        return this.min;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  min
     */
    public void setMin(java.lang.Integer min){
        this.min = min;
    }
    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  max
     */
    @Column(name ="MAX",nullable=true,precision=10,scale=0)
    public java.lang.Integer getMax(){
        return this.max;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  max
     */
    public void setMax(java.lang.Integer max){
        this.max = max;
    }
    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  cardlength
     */
    @Column(name ="CARDLENGTH",nullable=true,precision=10,scale=0)
    public java.lang.Integer getCardlength(){
        return this.cardlength;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  cardlength
     */
    public void setCardlength(java.lang.Integer cardlength){
        this.cardlength = cardlength;
    }
    /**
     *方法: 取得java.util.Date
     *@return: java.util.Date  createtime
     */
    @Column(name ="CREATETIME",nullable=false)
    public java.util.Date getCreatetime(){
        return this.createtime;
    }

    /**
     *方法: 设置java.util.Date
     *@param: java.util.Date  createtime
     */
    public void setCreatetime(java.util.Date createtime){
        this.createtime = createtime;
    }
    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  createuserid
     */
    @Column(name ="CREATEUSERID",nullable=false,precision=10,scale=0)
    public java.lang.Integer getCreateuserid(){
        return this.createuserid;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  createuserid
     */
    public void setCreateuserid(java.lang.Integer createuserid){
        this.createuserid = createuserid;
    }

    @OneToOne
    @JoinColumn(name = "shopid", insertable = false, updatable = false)
    public MallShopEntity getMallShopEntity() {
        return mallShopEntity;
    }

    public void setMallShopEntity(MallShopEntity mallShopEntity) {
        this.mallShopEntity = mallShopEntity;
    }

    @Transient
    public TSBaseUser getUser() {
        return user;
    }

    public void setUser(TSBaseUser user) {
        this.user = user;
    }

    @OneToOne
    @JoinColumn(name = "productid", insertable = false, updatable = false)
    public MallProductEntity getProductEntity() {
        return productEntity;
    }

    public void setProductEntity(MallProductEntity productEntity) {
        this.productEntity = productEntity;
    }

    @OneToOne
    @JoinColumn(name = "oilsupplierid", insertable = false, updatable = false)
    public MallOilsupplierEntity getOilsupplierEntity() {
        return oilsupplierEntity;
    }

    public void setOilsupplierEntity(MallOilsupplierEntity oilsupplierEntity) {
        this.oilsupplierEntity = oilsupplierEntity;
    }

    @Transient
    public String getCardNoPrefix() {
        return cardNoPrefix;
    }

    public void setCardNoPrefix(String cardNoPrefix) {
        this.cardNoPrefix = cardNoPrefix;
    }

    @Transient
    public String getStartCardNo() {
        return startCardNo;
    }

    public void setStartCardNo(String startCardNo) {
        this.startCardNo = startCardNo;
    }

    @Transient
    public String getEndCardNo() {
        return endCardNo;
    }

    public void setEndCardNo(String endCardNo) {
        this.endCardNo = endCardNo;
    }

    /**
     *方法: 取得java.lang.Integer
     *@return: java.lang.Integer  0未回收、1已回收、3已挂失
     */
    @Column(name ="STATE",nullable=true,precision=10,scale=0)
    public java.lang.Integer getState(){
        return this.state;
    }

    /**
     *方法: 设置java.lang.Integer
     *@param: java.lang.Integer  0未回收、1已回收、3已挂失
     */
    public void setState(java.lang.Integer state){
        this.state = state;
    }

    @Column(name = "isDelete")
    public Boolean getIsdelete() {
        return isdelete;
    }

    public void setIsdelete(Boolean isdelete) {
        this.isdelete = isdelete;
    }
}
